package cn.edu.just.firstjavaapp.l7;

import java.io.Serializable;

public class Person implements Serializable {

    String name;
    int age;
    String gender;
    double salary;

    public Person() {

    }

    public Person(String name, int age, String gender, double salary) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.salary = salary;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public void print(){
        System.out.printf("%10s%5d%8s%8.2f",name,age,gender,salary);
    }
}
